<?php

/**
 * Adminhtml grid item renderer
 *
 * @category   VES
 * @package    VES_Vendors
 * @author     Vnecoms Team <support@vnecoms.com>
 */

class VES_VendorsProduct_Block_Widget_Grid_Column_Renderer_TranslateActions
    extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action
{
	/**
     * Renders grid column
     *
     * @param   Varien_Object $row
     * @return  string
     */
    
/* you 三审不能编辑，不显示action选项 2016-07-21 */
    public function render(Varien_Object $row)
    {
        $text = parent::render($row);
        $value = $row->getData('approval');
		$sku  = $row->getData('sku');
        switch ($value)
        {
            case VES_VendorsProduct_Model_Source_Approval::STATUS_3RDAPPROVED:
                return false;
                break;
	        default :
                return '<span class="status_yellow"><a href="' .$this->getUrl('adminhtml/catalog_product/edit', array(
                    'store'=>$this->getRequest()->getParam('store'),
                    'id'=>$row->getId())
                    ) . '">' . Mage::helper('catalog')->__('Edit') .'</a></span>';
	            break;
        }
    }	
}
